<template>
  <div class="common-body-wrapper">
    <search-header single-width="130" :searchList="searchList" @changeHeight="toRetTable" @confirmSearch="toSearch"></search-header>
    <multi-fun-table :sortColumn='notFormatColumn' :orderType='sortType' :fixed-cols="fixedCols" :is-reset-table="isResetTable" :theads-info="theadsInfo" :tbodys-info="tbodysInfo" @handleMultiCheck="handleMultiCheck" @handleSortColumn="handleSortColumn" @searchFn="getList" @getNextPage="getNextPage">
      <!--按钮-->

      <!--普通列-->
      <template slot="tdCell" slot-scope="props">
        <el-table-column :fixed="props.fixed" :label="props.label" :min-width="props.minWidth" :width="props.width" :prop="props.prop" :sortable="props.sortable">
          <template slot-scope="scope">
            <span v-if="'reno' == props.prop">{{ scope.$index + 1 }}</span>
            <span v-else-if="'createTime' == props.prop">{{scope.row[props.prop]|mileSecondToDate}}</span>
            <span v-else-if="'modifyTime' == props.prop">{{scope.row[props.prop]|mileSecondToDate}}</span>
            <span v-else>{{ scope.row[props.prop] }}</span>
          </template>
        </el-table-column>
      </template>

      <!--操作列内的按钮-->
      <!-- <template slot="operateCell" slot-scope="props">
        <el-table-column :fixed="props.fixed" :label="props.label" min-width="60">
          <template slot-scope="scope">
            <el-button title="编辑" size="small" type="primary" class="ake_btn ake_font_btn ake_btn_text" icon="el-icon-edit" v-if="isPermmited('PLATFORM:ROLE:SAVE')" @click="toOpenEditRole(scope.row)"></el-button>
            <el-button title="删除" size="small" type="primary" class="ake_btn ake_font_btn ake_btn_red" icon="el-icon-delete" v-if="isPermmited('PLATFORM:ROLE:DEL')" @click="toOpenDeleteRole(scope.row)"></el-button>
          </template>
        </el-table-column>
      </template> -->
    </multi-fun-table>

    <table-pagination :size="total" :cur-page="pageNumber" @backData="getPagination"></table-pagination>

  </div>
</template>

<script>
import common from "@mixins/common.js";
import stardardList from "@mixins/tables/stardardList.js";

//modal
import invokeModal from "@mixins/modal/invokeModal.js";
// 引进vue的js
import plog from "./js/plog.js";

export default {
  name: 'authzPlog',
  mixins: [common, stardardList, invokeModal, plog],
  data() {
    const today = [
      new Date(moment().format("YYYY-MM-DD 00:00:00")),
      new Date(moment().format("YYYY-MM-DD 23:59:59"))
    ];
    return {
      total: 0,
      fixedCols: 0,
      searchList: [
        {
          index: 1,
          type: "datePicker",
          isShow: false,
          name: "query_time",
          text: "操作时间",
          propName: "query_startTime,query_endTime",
          value: today,
          style: { width: "360px" }
        },
        {
          index: 2,
          isShow: false,
          type: "text",
          name: "query_userid",
          text: "操作人",
          value: ""
        },
        {
          index: 3,
          isShow: false,
          type: "text",
          name: "menuLevel",
          text: "操作菜单",
          value: ""
        },
        {
          index: 4,
          isShow: false,
          type: "text",
          name: "operationObject",
          text: "操作对象",
          value: ""
        }
      ],
      theadsInfo: [
        // { index: 0, isShow: false, prop: "reno", text: "序号", width: 68 },
        {
          index: 1,
          isShow: false,
          prop: "menuLevel",
          text: "操作菜单",
          minWidth: 250
        },
        {
          index: 2,
          isShow: false,
          prop: "operation",
          text: "操作",
          minWidth: 155
        },
        {
          index: 3,
          isShow: false,
          prop: "userId",
          text: "操作人",
          minWidth: 90
        },
        {
          index: 4,
          isShow: false,
          prop: "operationObject",
          text: "操作对象",
          minWidth: 110
        },
        {
          index: 5,
          isShow: false,
          prop: "createTime",
          text: "操作时间",
          minWidth: 110
        }
      ],
      tbodysInfo: []
    };
  }
};
</script>

<style lang="less">
.role-row-modal {
  .first-item {
    width: 240px;
  }
}
.role-select {
  width: 240px;
}
</style>